@using AntDesign.Select
<Select Mode="multiple"
        DataSource="@_myColors"
        @bind-Values="@_selectedColorValues"
        ValueName="@nameof(MyColor.Value)"
		LabelName="@nameof(MyColor.Name)">
    <LabelTemplate>
        <LabelTemplateItem Context="item"
                           TItem="MyColor"
                           TItemValue="string"
                           Class="@("ant-tag ant-tag-" + (context as MyColor).Name)"
                           Style="margin-right: 4px;"
                           RemoveIconStyle="margin-top: 1px; display: inline-block;">
            <LabelTemplateItemContent>
                <span style="color: @((item as MyColor).Name);">@((item as MyColor).Name)</span>
            </LabelTemplateItemContent>
        </LabelTemplateItem>
    </LabelTemplate>
</Select>

@code
{
    class MyColor
    {
        public string Value { get; set; }
        public string Name { get; set; }
    }

    List<MyColor> _myColors;
    IEnumerable<string> _selectedColorValues;
    bool _toggleSearch;

    protected override void OnInitialized()
    {
        _myColors = new List<MyColor>
        {
            new MyColor {Value = "gold", Name = "gold"}, 
            new MyColor {Value = "lime", Name = "lime"}, 
            new MyColor {Value = "green", Name = "green"}, 
            new MyColor {Value = "cyan", Name = "cyan"}
        };

        _selectedColorValues = new List<string> { "gold", "cyan" };
    }
}